import Loadable from 'react-loadable';
import Loading from '@/components/Loading'
const Dashboard = Loadable({ loader: () => import(/*webpackChunkName:'Dashboard'*/'@/views/dashboard'), loading: Loading });
const Explanation = Loadable({ loader: () => import(/*webpackChunkName:'Explanation'*/'@/views/permission'), loading: Loading });
const AdminPage = Loadable({ loader: () => import(/*webpackChunkName:'AdminPage'*/'@/views/permission/adminPage'), loading: Loading });
const GuestPage = Loadable({ loader: () => import(/*webpackChunkName:'GuestPage'*/'@/views/permission/guestPage'), loading: Loading });
const EditorPage = Loadable({ loader: () => import(/*webpackChunkName:'EditorPage'*/'@/views/permission/editorPage'), loading: Loading });

export default [
  { path: "/dashboard", component: Dashboard, roles: ["admin", "editor", "guest"] },
  { path: "/permission/explanation", component: Explanation, roles: ["admin"] },
  { path: "/permission/adminPage", component: AdminPage, roles: ["admin"] },
  { path: "/permission/guestPage", component: GuestPage, roles: ["guest"] },
  { path: "/permission/editorPage", component: EditorPage, roles: ["editor"] },
];
